<?php if ($news_model !== null): ?>
    <?php
    $news_tag = 'Tag: ';
    if ($news_tag_model !== null) {
        $i = 1;
        foreach ($news_tag_model as $row_news_tag) {
            $news_tag .= '<a href="'.Yii::app()->createAbsoluteUrl('news/tag/'.function_lib::url_title($row_news_tag->news_tag_value)).'">'.$row_news_tag->news_tag_value.'</a>';
            if($i < count($news_tag_model)) $news_tag .= ', ';
            $i++;
        }
    }
    ?>
    <h1><?php echo $news_model->news_title; ?></h1>
    <div class="richhtml">
        <?php echo $news_model->news_content; ?>
    </div>
    <div class="news-info">
        sumber: <?php echo $news_model->news_source; ?><br />
        Dikirim pada <?php echo $news_model->news_input_datetime; ?>, oleh <b>Admin</b><br />
        <?php echo $news_tag; ?>
    </div>
    <?php
    if ($other_news_model !== null):
    ?>
    <div class="news-other">
        <h4>Berita terkait</h4>
        <ul>
            <?php
            foreach ($other_news_model as $row_other_news):
            ?>
            <li><a href="<?php echo Yii::app()->createAbsoluteUrl('news/detail/'.$row_other_news->rel_news_tag_to_news->news_id.'/'.function_lib::url_title($row_other_news->rel_news_tag_to_news->news_title)); ?>"><?php echo $row_other_news->rel_news_tag_to_news->news_title; ?></a></li>
            <?php endforeach; ?>
        </ul>
    </div>
    <?php endif; ?>
<?php endif; ?>